package org.yangspring.samples.mvc.serviceOracle;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.yangspring.samples.mvc.daoOracle.InventoriesDAO;
import org.yangspring.samples.mvc.domainOracle.Inventories;

import java.util.List;

import static java.lang.System.out;

/**
 * Created by whyang on 2017/06/22.
 */

@Service
public class InventoriesServiceImpl implements InventoriesService {

    private static final Logger logger = LoggerFactory.getLogger(InventoriesServiceImpl.class);

    @Autowired
    private InventoriesDAO inventoryDao;
//    public void setInventoryDao(InventoriesDAO inventoryDao){
//        this.inventoryDao = inventoryDao;
//    }

    @Transactional
    public List<Inventories> listInventory(){
        logger.warn("\nOracle InventoriesServiceImpl\n");

        return this.inventoryDao.listInventory();
    }

}
